{include file="common/forum_head"}

<div class="layui-container fly-marginTop">
  <div class="fly-panel" pad20 style="padding-top: 5px;">
    <!--<div class="fly-none">没有权限</div>-->
    <div class="layui-form layui-form-pane">
      <div class="layui-tab layui-tab-brief" lay-filter="user">
        <ul class="layui-tab-title">
          <li class="layui-this">发表新帖<!-- 编辑帖子 --></li>
        </ul>
        <div class="layui-form layui-tab-content" id="LAY_ucm" style="padding: 20px 0;">
          <div class="layui-tab-item layui-show">
            <form action="" method="post">
              <div class="layui-row layui-col-space15 layui-form-item">
                <div class="layui-col-md3">
                  <label class="layui-form-label">所在专栏</label>
                  <div class="layui-input-block">
                    <select lay-verify="required" name="cate_id" lay-filter="column">
                      <option></option>
                      {foreach $cate_list as $k=>$v}
                        <option value="{$v.id}" {if( !empty($note_info) && $v['id'] == $note_info['cate_id'])}selected{/if}>{$v.name}</option>
                      {/foreach}
                    </select>
                  </div>
                </div>

                <div class="layui-col-md9">
                  <label for="L_title" class="layui-form-label">标题</label>
                  <div class="layui-input-block">
                    <input type="text" id="L_title" name="title" required lay-verify="required" autocomplete="off" class="layui-input" {if(!empty($note_info['title']))}value="{$note_info.title}"{/if}>
                    <!-- <input type="hidden" name="id" value="{{d.edit.id}}"> -->
                  </div>
                </div>
              </div>



                <div class="layui-form-item layui-form-text">
                    <div class="layui-input-block">
                        <textarea id="L_content" name="content" required lay-verify="required" placeholder="详细描述" class="layui-textarea fly-editor" style="height: 260px;">{if(!empty($note_info['content']))}{$note_info.content}{/if}</textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">悬赏积分</label>
                        <div class="layui-input-inline" style="width: 190px;">
                            <select name="credit">
                                <option value="20" {if(!empty($note_info['credit']) && $note_info['credit']==20)}selected{/if}>20</option>
                                <option value="30" {if(!empty($note_info['credit']) && $note_info['credit']==30)}selected{/if}>30</option>
                                <option value="50" {if(!empty($note_info['credit']) && $note_info['credit']==50)}selected{/if}>50</option>
                                <option value="60" {if(!empty($note_info['credit']) && $note_info['credit']==60)}selected{/if}>60</option>
                                <option value="80" {if(!empty($note_info['credit']) && $note_info['credit']==80)}selected{/if}>80</option>
                            </select>
                        </div>
                        <div class="layui-form-mid layui-word-aux">发表后无法更改积分</div>
                    </div>
                </div>
                <!-- <div class="layui-form-item">
                   <label for="L_vercode" class="layui-form-label">人类验证</label>
                   <div class="layui-input-inline">
                     <input type="text" id="L_vercode" name="vercode" required lay-verify="required" placeholder="请回答后面的问题" autocomplete="off" class="layui-input">
                   </div>
                   <div class="layui-form-mid">
                     <span style="color: #c00;">1+1=?</span>
                   </div>
                 </div>
                 -->
              <div class="layui-form-item">
                  {if(!empty($note_info['id']) )}
                <input type="hidden" name="id" value="{$note_info.id}">
                  {else}
                  <input type="hidden" name="center_id" value="{$center_info['id']}">
                  {/if}
                <button class="layui-btn" lay-filter="submit-note" lay-submit>立即发布</button>
              </div>
            </form>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<script>
// layui.cache.page = 'jie';
layui.cache.user = {
  username: '游客'
  ,uid: -1
  ,avatar: '../../res/images/avatar/00.jpg'
  ,experience: 83
  ,sex: '男'
};
layui.config({
  version: "3.0.0"
  ,base: '__MODS__/'
}).extend({
  fly: 'index'
}).use('fly');
</script>


{include file="common/forum_foot"}
